import { stringify } from 'qs';
import request from '../utils/request';
export async function changeAthelateDatas(params) {
  return request(`/gameSignAthleteInfo/${params.id}`,{
    method: 'PATCH',
    body: params
  });
}
export async function addSignInfo(payload) {
  return request(`/gameSignInfo/addWithAthelete`, {
    method: 'POST',
    body: payload
  });
}

export async function modifySignInfo(payload) {
  return request(`/gameSignInfo/updateWithAthelete`, {
    method: 'PATCH',
    body: payload,
  });
}

export async function clear(payload) {
  return request(`/gameSignInfo/clear/${payload}`, {
    method: 'DELETE',
  });
}

export async function deleteSignInfo(payload) {
  return request(`/gameSignInfo/${payload}`, {
    method: 'DELETE',
  });
}

export async function querySignListForZubie(params) {
  const {zubieCode, headers} = params;
  return request(`/gameSignInfo/querySignInfo?${stringify({zubieCode})}`, {
    headers: headers?headers:{'x-page-num': 1,
    'x-page-size': 20},
    method: 'GET',
  });
}